home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1986 February / 1986-02.d64 / demo 2_vic (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  1KB  |  34 lines

  1. 99 ifa=0thena=1:load"vblinkobj",8,1
  2. 100 poke56,28:poke55,0:clr
  3. 110 nu=7
  4. 120 v1=1:v2=2:co=646:hi=28
  5. 140 pokev1,0:pokev2,hi
  6. 150 rem ** change these values to change the blink colors
  7. 160 dimct(nu)
  8. 170 fori=0tonu:ct(i)=nu-i:next
  9. 180 rem ** usr() is at $c000 for 64, $3c00 for +4/16, $1c00 for vic **
  10. 190 sd=16384: rem ** set delay flag
  11. 200 db=8192 : rem ** disable blink
  12. 210 eb=4096 : rem ** enable blink
  13. 220 sb=2048 : rem ** stop color from blinking
  14. 230 mb=1024 : rem ** make color start blinkg
  15. 240 vb=512  : rem ** return value of blinking color
  16. 250 rc=256  : rem ** reset all colors-nno blinking
  17. 260 rem *** now we demonstrate blink
  18. 270 x=usr(db): rem ** must disable blinkmode first
  19. 280 print"[147]"
  20. 290 poke53280,0:poke53281,0:rem make background black
  21. 300 rem for +4/16 - color 0,1,7:color 4,1,7 in line 290
  22. 310 rem for vic - poke36879,8 in line 290
  23. 320 for l=0 to nu: rem ** set all the colors
  24. 330 cl=ct(l)
  25. 340 x=usr(mb+(cl*16)+l): rem ** set the color to blink to
  26. 350 pokeco,l:rem ** change current color to x
  27. 360 print"blinking from"l"to"cl
  28. 370 next l
  29. 380 x=usr(sd+60): rem * set blink for 1 second
  30. 390 print:print"hit a key to start"
  31. 400 geta$:ifa$="" then400
  32. 410 x=usr(eb)
  33. 420 end
  34.